import './App.css';
import {useState} from 'react';


function MyButton({ count, onClick }) { 
 
  
  const btnInfo = {
    name: 'my-button',
  }
  return (
    <button className="my-button" onClick={onClick}>
      我是一个按钮{ btnInfo.name}---{count}
    </button>
  );
}


const App = () => {
  const [count, setCount] = useState(0);

  function handleClick() {
    setCount(count + 1);
  }
  return (
    <div className="content">
      <MyButton count={ count} onClick={handleClick} />
      <MyButton count={ count} onClick={handleClick} />
      <h1>Rsbuild with React</h1>
      <p>Start building amazing things with Rsbuild.</p>
    </div>
  );
};

export default App;
